package cn.wolfcode.car.business.mapper;

import cn.wolfcode.car.business.domain.Statement;
import cn.wolfcode.car.business.query.StatementQuery;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface StatementMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Statement statement);

    Statement selectByPrimaryKey(Long id);

    List<Statement> selectAll();

    int updateByPrimaryKey(Statement statement);

    List<Statement> selectForList(StatementQuery qo);

    void updateAmcount(@Param("statementId") Long statementId,
                       @Param("totalAmount") BigDecimal totalAmount,
                       @Param("totalQuantity") BigDecimal totalQuantity,
                       @Param("discountAmount") BigDecimal discountAmount);


    void updateByPay(@Param("statusPaid") Integer statusPaid, @Param("payeeId") Long payeeId, @Param("statementId") Long statementId);

    Statement selectByApponitmentId(Long id);

}